﻿Public Class ServiceDoc

    Private sistemaSV As ISistema = New SistemasDAO(ConnectionFactory.GetConnection())
    Private telaSV As ITela = New TelaDAO(ConnectionFactory.GetConnection())

    Function ListarSistemas() As List(Of Sistema)
        Dim listaSistema As List(Of Sistema) = sistemaSV.ListarSistemas()
        For index = 0 To listaSistema.Count - 1
            listaSistema.Item(index).LISTA_TELAS = telaSV.BuscarTelaPorSistema(listaSistema.Item(index).ID_SISTEMA)
        Next
        Return listaSistema
    End Function

    Function BuscarSistema(ByVal parId_Sistema) As Sistema
        Return sistemaSV.BuscarSistemas(parId_Sistema)
    End Function


End Class
